<%@ taglib prefix="s" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <ul class="nav nav-tabs">
            <li>
                <a href="#"  onclick="loadDiv('mainCenterDiv','${ctx}/reg/clinicAppoints/verifyIndex')">预约列表</a>
            </li>
            <li class="active">
                <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/reg/clinicAppoints/appointsEditPage')">预约修改</a>
            </li>
        </ul>
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="col-lg-12">
                    <form:form id="inputForm" data-parsley-validate="" modelAttribute="clinicAppoints" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/reg/clinicAppoints/appointsSave','${ctx}/reg/clinicAppoints/verifyIndex');" method="post" class="form-horizontal">
                        <form:hidden path="id"/>
                        <div class="col-lg-4">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">门诊号别：</label>
                                <div class="col-sm-6">
                                    <form:input path="clinicIndex.name" disabled="true" id="clinicName" htmlEscape="false" class="form-control"  maxlength="50" data-parsley-required="true" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">姓名：</label>
                                <div class="col-sm-6">
                                    <form:input path="name" id="name" htmlEscape="false" class="form-control"  maxlength="50" data-parsley-required="true" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">合同单位：</label>
                                <div class="col-sm-6">
                                    <form:input path="unitInContract" id="unitInContract" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">国籍：</label>
                                <div class="col-sm-6">
                                    <s:select path="nationality" class="form-control">
                                        <c:forEach items="${fns:getDictList('NATIONALITY_DICT')}" var="nation">
                                            <c:choose>
                                                <c:when test="${nation.value==clinicAppoints.nationality}">
                                                    <s:option value="${nation.value}" selected="selected">${nation.label}</s:option>
                                                </c:when>
                                                <c:otherwise>
                                                    <s:option value="${nation.value}">${nation.label}</s:option>
                                                </c:otherwise>
                                            </c:choose>
                                        </c:forEach>
                                    </s:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">出生地：</label>
                                <div class="col-sm-6">
                                    <form:input path="homeplace" id="homeplace" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">电话：</label>
                                <div class="col-sm-6">
                                    <form:input path="phone" id="phone" htmlEscape="false" class="form-control"  maxlength="50"  />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系人地址：</label>
                                <div class="col-sm-6">
                                    <form:input path="contactsAddress" id="contactsAddress" htmlEscape="false" class="form-control"  maxlength="50"  />
                                </div>
                            </div>

                        </div>
                        <div class="col-lg-4">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">就诊日期：</label>
                                <div class="col-sm-6">
                                    <input type="text" disabled="true" value="<fmt:formatDate value="${clinicAppoints.clinicForRegist.clinicDate}" pattern="yyyy-MM-dd"/>"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"
                                           id="clinicDate" class="form-control">
                                    <%--<form:input path="clinicForRegist.clinicDate" id="clinicDate" htmlEscape="false" class="form-control"  maxlength="50" data-parsley-required="true" />--%>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">年龄：</label>
                                <div class="col-sm-6">
                                    <form:input path="age" id="age" htmlEscape="false" class="form-control" max="200" maxlength="50"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">费别：</label>
                                <div class="col-sm-6">
                                    <s:select path="chargeType" class="form-control">
                                        <c:forEach items="${fns:getDictList('CHARGE_TYPE_DICT')}" var="charge">
                                            <c:choose>
                                                <c:when test="${charge.value==clinicAppoints.chargeType}">
                                                    <s:option value="${charge.value}" selected="selected">${charge.label}</s:option>
                                                </c:when>
                                                <c:otherwise>
                                                    <s:option value="${charge.value}">${charge.label}</s:option>
                                                </c:otherwise>
                                            </c:choose>

                                        </c:forEach>
                                    </s:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">民族：</label>
                                <div class="col-sm-6">
                                    <s:select path="nation" class="form-control">
                                         <c:forEach items="${fns:getDictList('NATION_DICT')}" var="nation">
                                             <c:choose>
                                                 <c:when test="${clinicAppoints.nation==nation.value}">
                                                     <s:option value="${nation.value}" selected="selected">${nation.label}</s:option>
                                                 </c:when>
                                                 <c:otherwise>
                                                     <s:option value="${nation.value}">${nation.label}</s:option>
                                                 </c:otherwise>
                                             </c:choose>
                                         </c:forEach>
                                    </s:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">住址：</label>
                                <div class="col-sm-6">
                                    <form:input path="address" id="address" htmlEscape="false" class="form-control"  maxlength="50"  />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">身份证号：</label>
                                <div class="col-sm-6">
                                    <form:input path="idNo" id="idCard" htmlEscape="false" class="form-control" data-parsley-checkidcard="3" maxlength="50" data-parsley-required="true" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系人：</label>
                                <div class="col-sm-6">
                                    <form:input path="contacts" id="contacts" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-4">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">就诊时间：</label>
                                <div class="col-sm-6">
                                    <s:select path="clinicForRegist.timeDesc" class="form-control" disabled="true">
                                          <c:forEach items="${fns:getDictList('TIME_OF_DAY')}" var="timeDesc">
                                              <c:choose>
                                              <c:when test="${timeDesc.value==clinicAppoints.clinicForRegist.timeDesc}">
                                                  <s:option value="${timeDesc.value}" selected="selected">${timeDesc.label}</s:option>
                                              </c:when>
                                              <c:otherwise>
                                                  <s:option value="${timeDesc.value}">${timeDesc.label}</s:option>
                                              </c:otherwise>
                                              </c:choose>
                                          </c:forEach>
                                    </s:select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">性别：</label>
                                <div class="col-sm-6">
                                    <s:select path="sex" class="form-control">
                                         <c:forEach items="${fns:getDictList('SEX_DICT')}" var="sex">
                                              <c:choose>
                                                  <c:when test="${sex.value==clinicAppoints.sex}">
                                                      <s:option value="${sex.value}" selected="selected">${sex.label}</s:option>
                                                  </c:when>
                                                  <c:otherwise>
                                                      <s:option value="${sex.value}">${sex.label}</s:option>
                                                  </c:otherwise>
                                              </c:choose>
                                         </c:forEach>
                                    </s:select>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">身份：</label>
                                <div class="col-sm-6">
                                    <s:select path="identity" class="form-control">
                                        <c:forEach items="${fns:getDictList('PROFESSION_DICT')}" var="profession">
                                             <c:choose>
                                                 <c:when test="${profession.value==clinicAppoints.identity}">
                                                     <s:option value="${profession.value}" selected="selected">${profession.label}</s:option>
                                                 </c:when>
                                                 <c:otherwise>
                                                     <s:option value="${profession.value}">${profession.label}</s:option>
                                                 </c:otherwise>
                                             </c:choose>
                                        </c:forEach>
                                    </s:select>

                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">籍贯：</label>
                                <div class="col-sm-6">
                                    <form:input path="nativePlace" id="nation" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">邮编：</label>
                                <div class="col-sm-6">
                                    <form:input path="zipCode" id="zipCode" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">联系人电话：</label>
                                <div class="col-sm-6">
                                    <form:input path="contactsPhone" data-parsley-mobilephone="3" id="contactsPhone" htmlEscape="false" class="form-control"  maxlength="50" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/reg/clinicAppoints/verifyIndex')">
                            </div>
                        </div>
                    </form:form>
                </div>

            </div>
        </section>
    </div>
</div>
